#version 330 core
in vec2 TexCoord;
out vec4 FragColor;
uniform sampler2D textureSampler;
uniform vec4 tint;
void main() {
    vec4 color = texture(textureSampler, TexCoord);
    if(color.a < 0.01)   discard;// 完全透明则丢弃
    vec3 tintedColor = color.rgb * tint.rgb;
    FragColor = vec4(tintedColor, min(tint.a, color.a));
}